package book;

public class BookList {
    private Book[] books=new Book[10];
    private int usedSize;
    public BookList(){
        books[0]=new Book("红楼梦","曹雪芹",56,"小说");
        books[1]=new Book("完美世界","辰东",33,"玄幻");
        books[2]=new Book("斗破苍穹","天蚕土豆",43,"玄幻");
        books[3]=new Book("仙逆","耳根",47,"修仙");
        usedSize=4;
    }
    public Book getBooks(int pas){
        if(pas<0){
            return null;
        }else{
            return books[pas];
        }
    }
    public void setBooks(int pas,Book book){
        books[pas]=book;
    }

    public int getUsedSize() {
        return usedSize;
    }
    public void setUsedSize(int usedSize){
        this.usedSize=usedSize;
    }
}
